<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/template.xhtml">

    <ui:define name="title"><h:outputText value="Invigilate Exam" /></ui:define>
    
    <ui:define name="content">
        <h:form id="invigilateStudentListForm">
            
            <hr/>
            <p:dataTable var="studentexamstatus" value="#{invigilateExamListView.studentExamStatus}" rows="10" id="studentModuleTable"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15"
                         rowKey="#{studentexamstatus.userId}"
                         >
                <p:column selectionMode="multiple" style="width:16px;text-align:center"/>

                <p:column headerText="Student Name">
                    <h:outputText value="#{studentexamstatus.userId}" />
                </p:column>
                               
                <p:column headerText="Question Answered">
                    <h:outputText value="#{studentexamstatus.answeredQuestions}" />
                </p:column>
                
                <p:column headerText="Status">
                    <h:outputText value="#{studentexamstatus.studentStatus}" />
                </p:column>
                     
            </p:dataTable>
            <hr/>
            
        </h:form>
            <p:socket channel="/invigilate">
                <p:ajax event="message" update=":invigilateStudentListForm:studentModuleTable" listener="#{invigilateExamListView.addStatus}"/>
            </p:socket>
        </ui:define>
    
</ui:composition>
       
